<?php

namespace app\api\controller;

use app\api\model\Banner;
use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        //计算 今天获得  了  多少 钢豆   只要 分享的
        $data['fen']="0";

        $this->success('请求成功',$data);
    }

    /**
     * banner
     * @return void
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function banner(){
        $Banner = new Banner();
        $list=$Banner->field('cover_image,type_data,num')->order('weigh desc')->select();
        $this->success('',$list);
    }
}
